package hu.diploma.web.server.restlet;

import hu.diploma.web.server.restlet.resources.CallResourceImpl;
import hu.diploma.web.server.restlet.resources.EchoResourceImpl;
import hu.diploma.web.server.restlet.resources.EmailResourceImpl;
import hu.diploma.web.server.restlet.resources.GroupResourceImpl;
import hu.diploma.web.server.restlet.resources.PersonResourceImpl;
import hu.diploma.web.server.restlet.resources.SmsMmsResourceImpl;
import hu.diploma.web.server.restlet.resources.UserResourceImpl;

import org.restlet.Application;
import org.restlet.Restlet;
import org.restlet.routing.Router;

public class RestletServer extends Application {

	@Override
	public Restlet createInboundRoot() {

		Router router = new Router(getContext());
		router.attach(UserResourceImpl.URL, UserResourceImpl.class);
		router.attach(PersonResourceImpl.URL, PersonResourceImpl.class);
		router.attach(GroupResourceImpl.URL, GroupResourceImpl.class);
		router.attach(EmailResourceImpl.URL, EmailResourceImpl.class);
		router.attach(SmsMmsResourceImpl.URL, SmsMmsResourceImpl.class);
		router.attach(CallResourceImpl.URL, CallResourceImpl.class);
		router.attach(EchoResourceImpl.URL, EchoResourceImpl.class);

		return router;
	}
}
